SlkAdministration.LoadConfiguration Method

Loads SLK configuration information from WSS and LearningStore, in a form that's suitable for copying to Configure.aspx form fields.

Parent Type: SlkAdministration

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public static bool LoadConfiguration (
Guid spSiteGuid,
out string databaseServer,
out string databaseName,
out bool createDatabase,
out string instructorPermission,
out string learnerPermission,
out bool createPermissions

)

Parameters

spSiteGuid

The GUID of the SPSite to retrieve configuration information from.

databaseServer

Set to the name of the database server associated with the specified SPSite. If no database is currently associated with spSiteGuid, this parameter is set to the name of the database server containing the SharePoint configuration database.

databaseName

Set to the name of the database associated with the specified SPSite. If no database is currently associated with spSiteGuid, this parameter is set to a default database name.

createDatabase

Set to true if the database specified by the values returned in databaseServer and databaseName currently exists, false if not. This can be used as the default value for the "Create a new database" checkbox in Configure.aspx.

instructorPermission

Set to the name of the SharePoint permission that identifies instructors. If no database is currently associated with the specified SPSite, this is set to a default value such as "SLK Instructor".

learnerPermission

Set to the name of the SharePoint permission that identifies learners. If no database is currently associated with the specified SPSite, this is set to a default value such as "SLK Learner".

createPermissions

Set to false if both the permission values returned in parameters instructorPermission and learnerPermission already exist in the root SPWeb of the specified SPSite, true otherwise. This can be used as the default value for the "Create permissions" checkbox in Configure.aspx.

Return Value

true if a mapping between spSiteGuid and a SharePoint Learning Kit database was found in the SharePoint configuration database, false if not. In the latter case, the out parameters are set to default values.

Exceptions
Exception type Condition
SafeToDisplayException

An error occurred that can be displayed to a browser user.

Remarks

This method is static so it can used outside the context of IIS. Only SharePoint administrators can perform this function.